﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Xiaowei.Players
{
    public enum PlayerState
    {
        Play,
        Pause,
        Stop,
        Buffering
    }
    public enum PlayMode
    {
        SinglePlay=0,
        OrderPlay=1,
        LoopPlay=2,
        RandomPlay=3
    }

    public enum PlayerCommandType
    {
        Launch,
        Play,
        Prev,
        Next,
        FastForward,
        FastRewind,
        SeekTo,
        PlayByOrder,
        PlayByRandom,
        PlayByListLoop,
        PlayBySingleLoop
    }


    public class PlayStateCombine
    {
        public PlayerState PlayerState;
        public string ID;
        public string Title;
    }

    public interface IPlayer
    {
        bool IsInstalled { get;}
        bool IsLaunched { get;}
        void Launch();
        void Play(object item);
        void Play();
        void Pause();
        void Stop();
        void Prev();
        void Next();
        void FastForward(int seconds);
        void FastRewind(int seconds);
        void SeekTo(int seconds);
        /*
         * Play mode
         */
        void PlayByOrder();
        void PlayByRandom();
        void PlayByListLoop();
        void PlayBySingleLoop();

        PlayStateCombine PlayStateCombine { get; }

        event EventHandler<PlayStateCombine> PlayerStateChanged;


        void Suspend();
        void Resumed();
        void Resumed2();
    }
}
